from werkzeug.security import generate_password_hash as gen_hash, check_password_hash as chk_hash

def generate_password_hash(password):
    return gen_hash(password)

def check_password(pw_hash, password):
    ans = chk_hash(pw_hash.strip(), password)
    return ans
